home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / arcer / gnutar10.lha / GnuTAR / GNUTarSource.LHA / source / Makefile < prev    next >
Makefile  |  1991-05-06  |  7KB  |  238 lines

  1. # Makefile for GNU tar program.
  2. #
  3. # In order to disable remote-tape support, add -DNO_REMOTE to the
  4. # appropriate DEFS line, and remove rtape_lib.* from LOCAL_{SRC,OBJ}
  5. #
  6. # If tar fails to properly print error msgs, or core-dumps doing same,
  7. # you may need to change which version of msg...() you are using.
  8. # To do so, add one of the following to your DEFS= line
  9. # -DSTDC_MSG        If you are using an ANSI compiler, and have vfprintf().
  10. # -DVARARGS_MSG        If you have varargs.h and vfprintf()
  11. # -DDOPRNT_MSG        If you have _doprnt(), and no useful varargs support
  12. # -DLOSING_MSG        If nothing else works.
  13. #
  14. # In addition to setting DEFS appropriately for your system, you might
  15. # have to hand edit the #defines and #undefs in port.c and rtape_lib.c.
  16. # For Ultrix 3.1, you will have to compile rtape_lib.c with -DUSG
  17. #
  18.  
  19. ## GNU version
  20. #DEFS = -DBSD42
  21. #LOCAL_SRC = 
  22. #LOCAL_OBJ = 
  23. #LDFLAGS =
  24. #LIBS =  -lutils
  25. #LINT = lint
  26. #LINTFLAGS = -abchx
  27. #DEF_AR_FILE = \"-\"
  28. #DEFBLOCKING = 20
  29. #O = o
  30.  
  31. # Berserkeley version
  32. DEFS = -DBSD42
  33. LOCAL_SRC = getdate.y  rtape_lib.c
  34. LOCAL_OBJ = getdate.$O rtape_lib.$O
  35. LDFLAGS =
  36. LIBS =
  37. LINT = lint
  38. LINTFLAGS = -abchx
  39. DEF_AR_FILE = \"/dev/rmt8\"
  40. DEFBLOCKING = 20
  41. O = o
  42.  
  43. # USG version
  44. # Add -DNDIR to DEFS if your system uses ndir.h instead of dirent.h
  45. # Add -DDIRECT to DEFS if your system uses 'struct direct' instead of
  46. # 'struct dirent' (this is the case at least with one add-on ndir 
  47. # library)
  48. # Add -DHAVE_MTIO to DEFS if your system has sys/mtio.h and defines MTIOCTOP
  49. # Add -DDAYLIGHT_MISSING to DEFS if your system doesn't define the
  50. # external variable `daylight'.
  51. # Add -lndir to LIBS if your ndir routines aren't in libc.a
  52. # Add -lPW to LIBS if you don't compile with gcc (to get alloca)
  53. #DEFS = -DUSG #-DNDIR -DDIRECT -DHAVE_MTIO
  54. #LOCAL_SRC =  getdate.y rtape_lib.c
  55. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  56. #LDFLAGS =
  57. #LIBS = #-lndir -lPW
  58. #LINT = lint
  59. #LINTFLAGS = -p
  60. #DEF_AR_FILE = \"/dev/rmt8\"
  61. #DEFBLOCKING = 20
  62. #O = o
  63.  
  64. # UniSoft's Uniplus SVR2 with NFS
  65. #DEFS = -DUSG -DUNIPLUS -DNFS -DSVR2
  66. #LOCAL_SRC =  getdate.y rtape_lib.c
  67. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  68. #LDFLAGS =
  69. #LIBS = -lndir
  70. #LINT = lint
  71. #LINTFLAGS = -bx
  72. #DEF_AR_FILE = \"/dev/rmt8\"
  73. #DEFBLOCKING = 20
  74. #O = o
  75.  
  76. # MASSCOMP version
  77. #CC = ucb cc
  78. #DEFS = -DBSD42
  79. #LOCAL_SRC =  getdate.y rtape_lib.c
  80. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  81. #LDFLAGS =
  82. #LIBS = 
  83. #LINT = lint
  84. #LINTFLAGS = -bx
  85. #DEF_AR_FILE = \"/dev/rmt0\"
  86. #DEFBLOCKING = 20
  87. #O = o
  88.  
  89. # (yuk) MS-DOS (Microsoft C 4.0) version
  90. #MODEL = S
  91. #DEFS = -DNONAMES -A$(MODEL) -DNO_REMOTE
  92. #LOCAL_SRC =  getdate.y rtape_lib.c
  93. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  94. #LDFLAGS =
  95. #LIBS = $(MODEL)dir.lib
  96. #LINT =    $(CC)
  97. #LINTFLAGS = -W3
  98. #DEF_AR_FILE = \"tar.out\"
  99. #DEFBLOCKING = 20
  100. #O = obj
  101.  
  102. # V7 version
  103. # Pick open3 emulation or nonexistence.  See open3.h, port.c.
  104. ##DEFS = -DV7 -DEMUL_OPEN3 -Dvoid=int
  105. ##DEFS = -DV7 -DNO_OPEN3 -Dvoid=int
  106. #LOCAL_SRC =  getdate.y rtape_lib.c
  107. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  108. #LDFLAGS =
  109. #LIBS = -lndir
  110. #LINT = lint
  111. #LINTFLAGS = -abchx
  112. #DEF_AR_FILE = \"/dev/rmt8\"
  113. #DEFBLOCKING = 20
  114. #O = o
  115.  
  116. # Minix version
  117. # No lint, so no lintflags.  Default file is stdin/out.  (Minix "tar"
  118. # doesn't even take an "f" flag, it assumes argv[2] is the archive name!)
  119. # Minix "make" doesn't expand macros right, so Minix users will have
  120. # to expand CFLAGS, SRCS, O, etc by hand, or fix your make.  Not my problem!
  121. # You'll also need to come up with ctime(), the directory
  122. # library, and a fixed doprintf() that handles %*s.  Put this stuff in
  123. # the "SUBSRC/SUBOBJ" macro below if you didn't put it in your C library.
  124. # Note that Minix "cc" produces ".s" files, not .o's, so O = s has been set.
  125. #
  126. # Pick open3 emulation or nonexistence.  See open3.h, port.c.
  127. ##DEFS = -DV7 -DMINIX -DEMUL_OPEN3
  128. ##DEFS = -DV7 -DMINIX -DNO_OPEN3
  129. #LOCAL_SRC =  getdate.y rtape_lib.c
  130. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  131. #LDFLAGS =
  132. #LIBS =
  133. #DEF_AR_FILE = \"-\"
  134. #DEFBLOCKING = 8    /* No good reason for this, change at will */
  135. #O = s
  136.  
  137. # Xenix version
  138. #DEFS = -DUSG -DXENIX
  139. #LOCAL_SRC =  getdate.y rtape_lib.c
  140. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  141. #LDFLAGS = 
  142. #LIBS = -lx
  143. #LINT = lint
  144. #LINTFLAGS = -p
  145. #DEF_AR_FILE = \"/dev/rmt8\"
  146. #DEFBLOCKING = 20
  147. #O = o
  148.  
  149. # SGI 4D version
  150. #DEFS = -DUSG -I/usr/include/bsd
  151. #LOCAL_SRC = getdate.y rtape_lib.c
  152. #LOCAL_OBJ =  getdate.$O rtape_lib.$O
  153. #LDFLAGS = 
  154. #LIBS =
  155. #LINT = lint
  156. #LINTFLAGS = -p
  157. #DEF_AR_FILE = \"/dev/tape\"
  158. #DEFBLOCKING = 20
  159. #O = o
  160.  
  161. #CC = gcc
  162. #TARGET_ARCH = 
  163.  
  164. CFLAGS = $(COPTS) $(ALLDEFS)
  165. ALLDEFS = $(DEFS) \
  166.     -DDEF_AR_FILE=$(DEF_AR_FILE) \
  167.     -DDEFBLOCKING=$(DEFBLOCKING)
  168. # next line for Debugging
  169. COPTS = -g
  170. # next line for Production
  171. #COPTS = -O
  172.  
  173. # Add things here like readdir that aren't in your standard libraries.
  174. # (E.g. MSDOS needs msd_dir.c, msd_dir.obj)
  175. SUBSRC=
  176. SUBOBJ=    
  177.  
  178. # Destination directory and installation program for make install
  179. DESTDIR = /usr/local
  180. INSTALL = cp
  181. RM = rm -f
  182.  
  183. SRC1 =    tar.c create.c extract.c buffer.c getoldopt.c update.c gnu.c
  184. SRC2 =  version.c list.c names.c diffarch.c port.c wildmat.c getopt.c getopt1.c
  185. SRC3 =  $(LOCAL_SRC) $(SUBSRC)
  186. SRCS =    $(SRC1) $(SRC2) $(SRC3)
  187. OBJ1 =    tar.$O create.$O extract.$O buffer.$O getoldopt.$O list.$O update.$O
  188. OBJ2 =    version.$O names.$O diffarch.$O port.$O wildmat.$O getopt.$O getopt1.$O
  189. OBJ3 =  gnu.$O $(LOCAL_OBJ) $(SUBOBJ)
  190. OBJS =    $(OBJ1) $(OBJ2) $(OBJ3)
  191. # AUX =    README PORTING Makefile TODO tar.h port.h open3.h \
  192. #    msd_dir.h msd_dir.c
  193. AUX =   README COPYING ChangeLog Makefile tar.texinfo tar.h port.h open3.h \
  194.     rmt.h msd_dir.h msd_dir.c rtape_server.c rtape_lib.c getdate.y getopt.h
  195.  
  196. all:    tar rmt
  197.  
  198. tar:    $(OBJS)
  199.     $(CC) $(LDFLAGS) -o tar $(COPTS) $(OBJS) $(LIBS)
  200.  
  201. rmt:    rtape_server.c
  202.     $(CC) $(CFLAGS) -o rmt rtape_server.c
  203.  
  204. # command is too long for Messy-Dos (128 char line length limit) so
  205. # this kludge is used...
  206. #    @echo $(OBJ1) + > command
  207. #    @echo $(OBJ2) >> command
  208. #    link @command, $@,,$(LIBS) /NOI;
  209. #    @$(RM) command
  210.  
  211. install: all
  212.     $(RM) $(DESTDIR)/bin/tar
  213.     $(INSTALL) tar   $(DESTDIR)/bin/tar
  214.     $(INSTALL) tar.texinfo $(DESTDIR)/man/tar.texinfo
  215.     $(INSTALL) rmt /etc/rmt
  216.  
  217. lint:    $(SRCS)
  218.     $(LINT) $(LINTFLAGS) $(ALLDEFS) $(SRCS)
  219.  
  220. clean:
  221.     $(RM) errs $(OBJS) tar rmt
  222.  
  223. shar: $(SRCS) $(AUX)
  224.     shar $(SRCS) $(AUX) | compress > tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c`.shar.Z
  225.  
  226. dist: $(SRC1) $(SRC2) $(AUX)
  227.     echo tar-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q < version.c` > .fname
  228.     mkdir `cat .fname`
  229.  
  230.     ln $(SRC1) $(SRC2) $(AUX) `cat .fname`
  231.     tar cvhZf `cat .fname`.tar.Z `cat .fname`
  232.     -rm -r `cat .fname` .fname
  233.  
  234. tar.zoo: $(SRCS) $(AUX)
  235.     zoo a tar $(AUX) $(SRCS)
  236.  
  237. $(OBJS): tar.h port.h
  238.